Events/System
__NOEDITSECTION__ : Note that this page is automatically generated; editing it is pointless. To edit event descriptions, edit the entries in the alphabetical pages, e.g. Events/A, Events/B, etc. Changes there will be copied over to here within a few hours. System related events (this event doesn't seem to be used anymore, use ADDON_ACTION_FORBIDDEN instead) Fires when an AddOn tries use actions that are always forbidden (movement, targeting, etc.). If called from an AddOn ---- ; arg1 : Name of the AddOn that was last involved in the execution path. ; arg2 : The protected function that was called. ; Notes : It's very possible that arg1 will not be the name of the addon that tried to call the protected function. If called from the chat prompt (/script CastSpellByName("Attack")) ---- ; arg1 : The protected function that was called. This event fires whenever an AddOn is loaded (fires once for each AddOn loaded if multiple AddOns are being loaded), whether that is during the inital Loading Phase or when an AddOn is loaded using the LoadAddOn("addonname") or UIParentLoadAddon("addonname") function. This event always fires after SavedVariables of the AddOn have been loaded from disk and its OnLoad function has been executed. ; arg1 : name of the AddOn that was just loaded Fired when a CVar is changed ; arg1 : cvarname ; arg2 : value (this event doesn't seem to be used anymore, use MACRO_ACTION_FORBIDDEN) Sent when a macro tries use actions that are always forbidden (movement, targeting, etc.). ; arg1 : The protected function that was called. Fired when all memory allocated to the UI is exhausted. ;arg1: Current memory limit (in MB). Fired when WoW recovers from an out of memory error. Fired when the player enters the world, enters/leaves an instance, or respawns at a graveyard. Also fires any other time the player sees a loading screen. To check if the player is entering an instance, check GetPlayerMapPosition to see if both X and Y are zero. Correction on the above comment: When PLAYER_ENTERING_WORLD fires, you'll notice that WORLD_MAP_UPDATE fires just before it. My instincts tell that leaving an instance puts the player in void space momentarily. So for the case that you are entering AND leaving an instance, GetPlayerMapPosition always returns the coordinates and hence there is no way to determine using the event PLAYER_ENTERING_WORLD if the player is entering an instance or not. When leaving an instance the following events fire (ignoring party/raid events). :WORLD_MAP_UPDATE :PLAYER_ENTERING_WORLD :WORLD_MAP_UPDATE <--- Player coordinates are non-zero here Instances do have coordinates for units once the second WORLD_MAP_UPDATE event has fired. For the case of entering a battleground such as WSG, WORLD_MAP_UPDATE won't fire until you leave Silverwing Hold or Warsong Lumber Mill and you are outside. --Salanex Fired when a player logs out and possibly at other situations as well Triggered immediately before PLAYER_ENTERING_WORLD on login and UI Reload, but NOT when entering/leaving instances. Sent when the player logs out or the UI is reloaded, after PLAYER_LEAVING_WORLD, but before variables are saved. Note: There seems to be little useful you can do after this event is fired. Changes to saved variables do not seem to have any effect, at least some API functions no longer return valid values, and client crashes may also occur in some cases. Perhaps worst of all, the error handling in Lua is no longer functional; so you will get no error messages if your code fails. Fired when the player tries to quit, as opposed to logout, while outside an inn. This event does not indicate that the "player has quit", but instead that the "player has the quitting option". The dialog which appears after this event, has choices of "Exit Now" or "Cancel". The dialog which appears when you try to logout outside an inn, only has a "Cancel" choice, and the event is not fired. Fired when a screenshot fails. Fired when a screenshot is successfully taken. Fired when the client recieved a time played message. ; arg1 : Total time ; arg2 : Current time at this level Fired when the interface creates an error message. These are the red messages that show in the top middle of the screen. "Your inventory is full." is one example. ; arg1 : message Fired when the interface generates a message. These are the yellow messages in the top middle of the window. "No fish are hooked." is one example. ; arg1 : message Fired when the keybindings are changed. Fired after completion of LoadBindings(), SaveBindings(), and SetBinding() (and its derivatives). Fired during the loading phase of the UI to indicate that the Saved Variables of all AddOns that will be loaded during the initial load (or reload) of the UI have have been read into memory from their files. Note that using this event means that your addon can not be loaded on demand properly. It is better to use ADDON_LOADED and test for arg1 being the name of your addon.